﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Serialization;

namespace mrp16062010
{
    abstract class Stok : ISerializable
    {
        public string Id { get; set; }
        public int Kod;
        public string Ad;
        public int Adet = 1;
        public List<Stok> BilesenList = new List<Stok>();
        public Stok Ust;
        public int Seviye { get; set; }

        public void Ekle(Stok stok)
        {
            BilesenList.Add(stok);
            stok.Ust = this;
        }
        public Stok()
        {

        }
        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            Serialize.InfoCopier.Write(info, this);
        }

        public Stok(SerializationInfo info, StreamingContext context)
        {
            Serialize.InfoCopier.Read(info, this);
        }
    }
}
